package com.tmxk.api.day04.gull;

import javax.jws.Oneway;

/**
 * 文件后缀类型
 */
public enum FilePathSuffix {
   // txt,doc,xls,xlsx,jpg,gif;
    ONE(1,"txt"),
    TWO(2,"doc"),
    THREE(3,"xls"),
    FOUR(4,"xlsx"),
    FIVE(5,"jpg"),
    SIX(6,"gif");

    private int code;
    private String vaule;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getVaule() {
        return vaule;
    }

    public void setVaule(String vaule) {
        this.vaule = vaule;
    }

    FilePathSuffix(int code , String value){
        this.code = code;
        this.vaule = value;
    }

    public static FilePathSuffix getFilePathSuffixByCode(int code){
        switch (code){
            case 1:
                return ONE;
            case 2:
                return TWO;
            case 3:
                return THREE;
            case 4:
                return FOUR;
            case 5:
                return FIVE;
            case 6:
                return SIX;
            default:
                return ONE;
        }
    }

}
